package com.itheima.递归;

public class Test02 {
    public static void main(String[] args) {
        /*
        1     2 3 4 5 6
        1     1 3 4 7 11 18
              (1+3)+7
         */
        int res = rabbit(20);
        System.out.println("res = " + res);
    }

    public static int rabbit(int i) {
        if(i == 1 || i == 2){
            return 1;
        }else{
            return rabbit(i-1)+rabbit(i-2);
        }
    }
}
